package com.ceair.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 流程定义表
 * </p>
 *
 * @author wangbaohai
 * @since 2025-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("process_definition")
public class ProcessDefinition implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 流程定义表主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 流程唯一标识(业务中使用的 key)
     */
    @TableField("process_key")
    private String processKey;

    /**
     * 流程名称
     */
    @TableField("process_name")
    private String processName;

    /**
     * 流程版本号
     */
    @TableField("process_version")
    private Integer processVersion;

    /**
     * BPMN XML存放在MongoDB中的ID
     */
    @TableField("xml_mongo_id")
    private String xmlMongoId;

    /**
     * 状态：0-草稿, 1-发布, 2-停用
     */
    @TableField("process_status")
    private Integer processStatus;

    /**
     * 流程描述/说明
     */
    @TableField("description")
    private String description;

    /**
     * 0:启用,1:删除
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    private Boolean deleted;

    /**
     * 创建人id
     */
    @TableField(value = "creator_id", fill = FieldFill.INSERT)
    private Long creatorId;

    /**
     * 创建人名称
     */
    @TableField(value = "creator_name", fill = FieldFill.INSERT)
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改人id
     */
    @TableField(value = "modifier_id", fill = FieldFill.INSERT_UPDATE)
    private Long modifierId;

    /**
     * 修改人名称
     */
    @TableField(value = "modifier_name", fill = FieldFill.INSERT_UPDATE)
    private String modifierName;

    /**
     * 修改时间
     */
    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;

    /**
     * 版本号
     */
    @TableField(value = "record_version", fill = FieldFill.INSERT)
    private Integer recordVersion;

    /**
     * 扩展字段1
     */
    @TableField("attribute1")
    private String attribute1;

    /**
     * 扩展字段2
     */
    @TableField("attribute2")
    private String attribute2;

    /**
     * 扩展字段3
     */
    @TableField("attribute3")
    private String attribute3;

    /**
     * 扩展字段4
     */
    @TableField("attribute4")
    private String attribute4;

    /**
     * 扩展字段5
     */
    @TableField("attribute5")
    private String attribute5;


}
